<?php



namespace App\Services\Business\Models;

use Illuminate\Database\Eloquent\Model;

class   MediaImage extends Model
{
    protected $table = 'media_images';

    protected $fillable = [
        'media_imageable_type','media_imageable_id','url_small','url'
    ];

    protected $appends = [
        'path','path_small'
    ];


    public function getPathAttribute()
    {

        return   parse_url($this->url, PHP_URL_PATH);
    }

    public function getPathSmallAttribute()
    {

        return   parse_url($this->url_small, PHP_URL_PATH);
    }

}
